package other.nowcoder.easy;

import java.util.Scanner;

/**
 * @author bruin_du
 * @description 有假币
 * https://www.nowcoder.com/questionTerminal/1d18c0841e64454cbc3afaea05e2f63c
 * @date 2022/5/28 18:09
 **/
public class CounterfeitMoney {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNextInt())
        {
            int n = in.nextInt();
            if(n == 0) break;
            //从小往大找
//            long range = 1;
//            long count = 0;
//            while(n > range){
//                range *= 3;
//                count++;
//            }
//            System.out.println(count);

            //从大往小，向上取整
            int count = 0;
            while(n >= 2){
                n = (int)Math.ceil(n / 3.0);
                count++;
            }
            System.out.println(count);
        }
    }
}
